package game01;

import javax.swing.*;
import java.awt.*;

public class MyPanel extends JPanel {

    @Override
    public void paint(Graphics g) {

        super.paint(g);
        g.setColor(Color.BLUE);
        g.fillOval(0,0,100,100);
        g.fillRect(10,200,300,80);
        g.setFont(new Font("微软雅黑", Font.BOLD, 24));
        g.drawString("Hello World",200,400);
        int[] xPoints = {100,200,300};
        int[] yPoints = {200,50,200};
        g.fillPolygon(xPoints,yPoints,3);
    }
}

